import request from '@/utils/request'

// 查询车间列表
export function listMesworkshop(query) {
  return request({
    url: '/mes/workshop/mesworkshop/list',
    method: 'get',
    params: query
  })
}

// 查询车间详细
export function getMesworkshop(workshop_code) {
  return request({
    url: '/mes/workshop/mesworkshop/' + workshop_code,
    method: 'get'
  })
}

// 新增车间
export function addMesworkshop(data) {
  return request({
    url: '/mes/workshop/mesworkshop',
    method: 'post',
    data: data
  })
}

// 修改车间
export function updateMesworkshop(data) {
  return request({
    url: '/mes/workshop/mesworkshop',
    method: 'put',
    data: data
  })
}

// 删除车间
export function delMesworkshop(workshop_code) {
  return request({
    url: '/mes/workshop/mesworkshop/' + workshop_code,
    method: 'delete',
  })
}

// 获取车间选择框列表
export function optionselect() {
  return request({
    url: '/mes/workshop/mesworkshop/optionselect',
    method: 'get'
  })
}

// 查询车间
// export function dictSelect(query) {
//   return request({
//     url: '/mesworkshop/mesworkshop/dictSelect',
//     method: 'get',
//     params: query
//   })
// }
